package com.shudai.largescreen.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author xiaoqi
 * @since 2022-10-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sd_order")
@ApiModel(value="SdOrder对象", description="订单")
public class Order implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "客户档案id")
    @TableField("user_record_id")
    private Long userRecordId;

    @ApiModelProperty(value = "买家头像")
    @TableField("buyer_avatar")
    private String buyerAvatar;

    @ApiModelProperty(value = "买家名称")
    @TableField("buyer_name")
    private String buyerName;

    @ApiModelProperty(value = "收货地址id")
    @TableField("address_id")
    private Long addressId;

    @ApiModelProperty(value = "收货人省")
    @TableField("receiver_province")
    private String receiverProvince;

    @ApiModelProperty(value = "收货人市")
    @TableField("receiver_city")
    private String receiverCity;

    @ApiModelProperty(value = "收货人区")
    @TableField("receiver_district")
    private String receiverDistrict;

    @ApiModelProperty(value = "收货人详细地址")
    @TableField("receiver_detail_address")
    private String receiverDetailAddress;

    @ApiModelProperty(value = "收货人名称")
    @TableField("receiver_name")
    private String receiverName;

    @ApiModelProperty(value = "收货人电话")
    @TableField("receiver_phone")
    private String receiverPhone;

    @ApiModelProperty(value = "收货人店铺名称")
    @TableField("receiver_shop_name")
    private String receiverShopName;

    @ApiModelProperty(value = "业务员id")
    @TableField("tool_man_id")
    private Long toolManId;

    @ApiModelProperty(value = "业务员名称")
    @TableField("tool_man_name")
    private String toolManName;

    @ApiModelProperty(value = "业务员电话")
    @TableField("tool_man_phone")
    private String toolManPhone;

    @ApiModelProperty(value = "订单编号(DZSD+时间戳)")
    @TableField("order_number")
    private String orderNumber;

    @ApiModelProperty(value = "订单总数量")
    @TableField("total_number")
    private Integer totalNumber;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "订单实付金额")
    @TableField("pay_amount")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "签名图片")
    @TableField("signature_img")
    private String signatureImg;

    @ApiModelProperty(value = "物流快递公司")
    @TableField("tracking_company")
    private String trackingCompany;

    @ApiModelProperty(value = "物流快递单号")
    @TableField("tracking_number")
    private String trackingNumber;

    @ApiModelProperty(value = "订单状态(-1:已取消 0:待付款 1:待发货 3:待收货 4:已完成)")
    @TableField("order_state")
    private Integer orderState;

    @ApiModelProperty(value = "下单时间")
    @TableField("order_time")
    private LocalDateTime orderTime;

    @ApiModelProperty(value = "支付时间")
    @TableField("payment_time")
    private LocalDateTime paymentTime;

    @ApiModelProperty(value = "发货时间")
    @TableField("deliver_time")
    private LocalDateTime deliverTime;

    @ApiModelProperty(value = "完成时间")
    @TableField("complete_time")
    private LocalDateTime completeTime;

    @ApiModelProperty(value = "付款方式（1:到付 2:微信）")
    @TableField("pay_method")
    private Integer payMethod;

    @ApiModelProperty(value = "支付订单号")
    @TableField("out_trade_no")
    private String outTradeNo;

    @ApiModelProperty(value = "是否为第一次使用此规格下单")
    @TableField("on_first_order_sku")
    private Boolean onFirstOrderSku;

    @ApiModelProperty(value = "是否使用抵扣卷")
    @TableField("on_use_discount")
    private Boolean onUseDiscount;

    @TableField("discount_id")
    private Long discountId;

    @ApiModelProperty(value = "抵扣金额")
    @TableField("discount_amount")
    private BigDecimal discountAmount;

    @ApiModelProperty(value = "订单备注")
    private String remark;

    @ApiModelProperty(value = "分享人id")
    @TableField("share_id")
    private Long shareId;

    @ApiModelProperty(value = "分享人昵称")
    @TableField("share_name")
    private String shareName;

    @ApiModelProperty(value = "订单确认二维码")
    private String qrcode;

    @ApiModelProperty(value = "是否为客服下单")
    @TableField("on_assist_order")
    private Boolean onAssistOrder;

    @ApiModelProperty(value = "是否为业务员下单")
    @TableField("on_tool_man_assist_order")
    private Boolean onToolManAssistOrder;

    @ApiModelProperty(value = "订单审核状态(-1:已驳回 0:待审核 1:已通过)")
    @TableField("examine_state")
    private Integer examineState;

    @ApiModelProperty(value = "审核时间")
    @TableField("examine_time")
    private LocalDateTime examineTime;

    @ApiModelProperty(value = "是否担保订单")
    @TableField("on_assure_order")
    private Boolean onAssureOrder;

    @ApiModelProperty(value = "是否用户在用规格订单")
    @TableField("on_custom_order")
    private Boolean onCustomOrder;

    @ApiModelProperty(value = "是否定制版图")
    @TableField("on_custom_product_image")
    private Boolean onCustomProductImage;

    @ApiModelProperty(value = "订单优惠政策类型(0:无 1:兼职首单业务员奖励 2:首单赠送 3:通用袋增加)")
    @TableField("tool_man_order_discount_type")
    private Integer toolManOrderDiscountType;

    @ApiModelProperty(value = "订单优惠政策数值1")
    @TableField("tool_man_order_discount_param1")
    private BigDecimal toolManOrderDiscountParam1;

    @ApiModelProperty(value = "订单优惠政策数值2")
    @TableField("tool_man_order_discount_param2")
    private BigDecimal toolManOrderDiscountParam2;

    @ApiModelProperty(value = "是否取消")
    @TableField("on_cancel")
    private Boolean onCancel;

    @ApiModelProperty(value = "取消原因")
    @TableField("cancel_reason")
    private String cancelReason;

    @ApiModelProperty(value = "运营活动策略id")
    @TableField("operational_activity_id")
    private Long operationalActivityId;

    @ApiModelProperty(value = "运营活动策略")
    @TableField("operational_activity_name")
    private String operationalActivityName;

    @ApiModelProperty(value = "是否返单")
    @TableField("on_second_order")
    private Boolean onSecondOrder;

    @ApiModelProperty(value = "用户下单次数")
    @TableField("user_order_times")
    private Long userOrderTimes;

    @ApiModelProperty(value = "是否拼单")
    @TableField("on_group_buy")
    private Boolean onGroupBuy;

    @ApiModelProperty(value = "参与本次拼单的订单id")
    @TableField("group_buy_ids")
    private String groupBuyIds;

    @ApiModelProperty(value = "需求图片")
    @TableField("demand_image")
    private String demandImage;

    @ApiModelProperty(value = "需求文件")
    @TableField("demand_file")
    private String demandFile;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_at")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "创建人")
    @TableField("created_by")
    private Long createdBy;

    @ApiModelProperty(value = "逻辑删除时间")
    @TableField("deleted_at")
    private LocalDateTime deletedAt;

    @ApiModelProperty(value = "修改时间")
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "修改人")
    @TableField("updated_by")
    private Long updatedBy;

    @ApiModelProperty(value = "取消-操作用户id")
    @TableField("cancel_operate_user_id")
    private Long cancelOperateUserId;

    @ApiModelProperty(value = "取消-操作用户名称")
    @TableField("cancel_operate_user_name")
    private String cancelOperateUserName;

    @ApiModelProperty(value = "取消-操作时间")
    @TableField("cancel_time")
    private LocalDateTime cancelTime;

    @ApiModelProperty(value = "客户编号")
    @TableField("customer_number")
    private String customerNumber;

    @ApiModelProperty(value = "是否返单-确认时间")
    @TableField("on_second_order_confirm_time")
    private LocalDateTime onSecondOrderConfirmTime;

    @ApiModelProperty(value = "订单初始金额(预计订单金额)")
    @TableField("origin_amount")
    private BigDecimal originAmount;

    @ApiModelProperty(value = "收货人店铺类型名称")
    @TableField("receiver_shop_class_name")
    private String receiverShopClassName;


}
